<%@ page language="java" import="java.text.*, java.util.*, com.zjut.zs.util.tools.*,com.zjut.zs.userinfo.manager.*, com.zjut.zs.userinfo.dao.*,
com.zjut.zs.user.manager.*, com.zjut.zs.user.dao.*,com.zjut.zs.exvalue.manager.*,com.zjut.zs.exvalue.dao.*,com.zjut.zs.cj.manager.*, com.zjut.zs.cj.dao.*,
com.zjut.an.util.tools.*,com.zjut.an.util.system.*,com.zjut.zs.xy.manager.*, com.zjut.zs.xy.dao.*,com.zjut.zs.zxlb.manager.*, com.zjut.zs.zxlb.dao.*,
com.zjut.zs.exvalue.dao.*,com.zjut.zs.coname.manager.*, com.zjut.zs.school.manager.*, com.zjut.zs.school.dao.*,com.zjut.zs.applyview.manager.*, com.zjut.zs.applyview.dao.*,
com.zjut.zs.shhd.manager.*, com.zjut.zs.shhd.dao.*,com.zjut.zs.hjqk.manager.*, com.zjut.zs.hjqk.dao.*,com.zjut.an.config.manager.*, com.zjut.an.config.dao.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>无标题文档</title>

<link href="../apply/css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
h1 {
	font-size:32px;
	font-family: "Arial","Microsoft YaHei",sans-serif;
}
table.gridtable {
	font-family: verdana,arial,sans-serif;
	font-size:11px;
	color:#333333;
	border-width: 1px;
	border-color: #666666;
	border-collapse: collapse;
}
table.gridtable td {
	border: 1px solid #666;
	padding: 6px;
}
table.toptable td {
	border: 1px solid #666;
	border-bottom:none;
	padding: 6px;
}
table.cj {table-layout: fixed;}
table.cj td {
	border: 1px solid #666;
	border-bottom:none;
	padding: 6px;
}
-->
</style>
<script type="text/javascript" src="../apply/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
function printHtml(html) {
	var bodyHtml = document.body.innerHTML;
	document.body.innerHTML = html;
	window.print();
	document.body.innerHTML = bodyHtml;
}
function onprint() {
	var html = $("#container").html();
	printHtml(html);
}
</script>

</head>
<%	
AnConfigManager anconfig = (AnConfigManager) SpringContextUtil.getBean("AnConfigManager");
ZsSchoolManager zsManager = (ZsSchoolManager) SpringContextUtil.getBean("ZsSchoolManager");
ZsCoNameManager comanager = (ZsCoNameManager) SpringContextUtil.getBean("ZsCoNameManager");
ZsExValueManager evmanager = (ZsExValueManager) SpringContextUtil.getBean("ZsExValueManager");
ZsUserinfoManager uimanager = (ZsUserinfoManager) SpringContextUtil.getBean("ZsUserinfoManager");
ZsZxlbManager zmanager = (ZsZxlbManager) SpringContextUtil.getBean("ZsZxlbManager");
ZsShhdManager smanager = (ZsShhdManager) SpringContextUtil.getBean("ZsShhdManager");
ZsHjqkManager hmanager = (ZsHjqkManager) SpringContextUtil.getBean("ZsHjqkManager");
ZsCjManager cmanager = (ZsCjManager) SpringContextUtil.getBean("ZsCjManager");
ZsXyManager xmanager = (ZsXyManager) SpringContextUtil.getBean("ZsXyManager");
ZsUserManager umanager = (ZsUserManager) SpringContextUtil.getBean("ZsUserManager");
ZsHTMLCreat html = (ZsHTMLCreat) SpringContextUtil.getBean("ZsHTMLCreat");


System.out.println(request.getParameter("rowstr"));
List<ZsApplyView> list = JSONUtilClassTime.getDTOList(request.getParameter("rowstr"), ZsApplyView.class);
System.out.println("###############"+list.size());



ZsSchool school = new ZsSchool();
school = (ZsSchool)zsManager.getDataByInstance(1,1,null,null,school).getObjects().get(0);




%>
<body>
	<div class="place" style="margin-top:0;">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">申请表打印</a></li>
    </ul>
    </div>
    <input type="button" onClick="onprint()" value="打印" class="btn btn-primary btn-sm" style="margin:20px;"/>
    <div id="container" class="container" style="width:100%;">
<%

for (int i=0; i<list.size(); i++) {
	ZsUser user = null;
	ZsExValue exValue = new ZsExValue();
	ZsUserinfo userinfo = new ZsUserinfo();
	ZsCj cj = new ZsCj();
	ZsXy xy = new ZsXy();
	ZsZxlb zxlb = new ZsZxlb();
	ZsShhd shhd = new ZsShhd();
	ZsHjqk hjqk = new ZsHjqk();

	
	ZsApplyView applyview=(ZsApplyView)list.get(i);
	String usId = applyview.getUsId();
	user = umanager.getData(usId);
	zxlb.setZsUser(umanager.getData(usId));
	shhd.setZsUser(umanager.getData(usId));
	hjqk.setZsUser(umanager.getData(usId));
	List zlist = zmanager.getDataByInstance(1,100,null,null,zxlb).getObjects();
	List slist = smanager.getDataByInstance(1,100,null,null,shhd).getObjects();
	List hlist = hmanager.getDataByInstance(1,100,null,null,hjqk).getObjects();

	if (user!=null) {
		exValue.setZsUser(user);	
		userinfo.setZsUser(user);
		cj.setZsUser(user);
		xy.setZsUser(user);
											
		List evlist = evmanager.getDataByInstance(1,1,null,null,exValue).getObjects();
		List uilist = uimanager.getDataByInstance(1,1,null,null,userinfo).getObjects();
		List clist = cmanager.getDataByInstance(1,1,null,null,cj).getObjects();
		List xlist = xmanager.getDataByInstance(1,1,null,null,xy).getObjects();
		
		if (evlist.size()>0) {
			exValue = (ZsExValue)evlist.get(0);
		}
		if (uilist.size()>0) {
			userinfo = (ZsUserinfo)uilist.get(0);
		}
		if (clist.size()>0) {
			cj = (ZsCj)clist.get(0);
		}
		if (xlist.size()>0) {
			xy = (ZsXy)xlist.get(0);
		}
	}
	
	//String receiveno = html.getReceiveNo(user.getUsNo());
	
%>   

    <div style="page-break-after:always;">
<div style="text-align:center"><h1>
  	 	<%if(Status.SENDSTATUS_YES.getStatus().equals(applyview.getSendStatus())) { 
  		  		out.println(anconfig.getSingleConfigInfoByName("申请表名称"));
  		  } else {
  		  		out.println(anconfig.getSingleConfigInfoByName("申请表名称") + "<br>此为预览表，检查所有信息正确无误后请于左边菜单中'提交报考申请'生成正式申请表 "); 
  		  }
  		%>
  		</h1></div>
  		<table width="1000" class="toptable" style="margin:0 auto;">
    		  <tr>
		        <td>
		        <div style="width:190px;float:left;">网上报名编号：<%=user.getUsNo() %></div>
		        <div <%if(userinfo.getInZydm01().trim().length()==0)out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("inZymc01").getCoCn() %>:
		        <%=userinfo.getInZymc01() %></div>
		        <div <%if(userinfo.getInZydm02().trim().length()==0)out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("inZymc02").getCoCn() %>:
		        <%=userinfo.getInZymc02() %></div>
		        <div <%if(userinfo.getInZydm03().trim().length()==0)out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("inZymc03").getCoCn() %>:
		        <%=userinfo.getInZymc03() %></div>
		        <div <%if(userinfo.getInZydm04().trim().length()==0)out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("inZymc04").getCoCn() %>:
		        <%=userinfo.getInZymc04() %></div>
		        <div <%if(userinfo.getInZydm05().trim().length()==0)out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("inZymc05").getCoCn() %>:
		        <%=userinfo.getInZymc05() %></div>
		        <div <%if(userinfo.getInZydm06().trim().length()==0)out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("inZymc06").getCoCn() %>:
		        <%=userinfo.getInZymc06() %></div>
		        <div <%if(userinfo.getInZydm07().trim().length()==0)out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("inZymc07").getCoCn() %>:
		        <%=userinfo.getInZymc07() %></div>
		        <div <%if(userinfo.getInZydm08().trim().length()==0)out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("inZymc08").getCoCn() %>:
		        <%=userinfo.getInZymc08() %></div>
		        <div <%if(userinfo.getInZydm09().trim().length()==0)out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("inZymc09").getCoCn() %>:
		        <%=userinfo.getInZymc09() %></div>
		        <div <%if(userinfo.getInZydm10().trim().length()==0)out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("inZymc10").getCoCn() %>:
		        <%=userinfo.getInZymc10() %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("inXxbz1").getListPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("inXxbz1").getCoCn() %>：<%=html.getInputString(userinfo.getInXxbz1()) %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("inXxbz2").getListPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("inXxbz2").getCoCn() %>：<%=html.getInputString(userinfo.getInXxbz2()) %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("inXxbz3").getListPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("inXxbz3").getCoCn() %>：<%=html.getInputString(userinfo.getInXxbz3()) %></div>
		        
		        </td>
		      </tr>
   		</table>
   		<table width="1000" class="gridtable" style="margin-bottom:0px;margin:0 auto;">
   		  <tr>
   		    <td>姓　名：</td>
   		    <td><%=user.getUsName() %></td>
   		    <td>性　别：</td>
   		    <td><%=userinfo.getInXb() %></td>
   		    <td>民　族：</td>
   		    <td><%=userinfo.getInMz() %></td>
   		    <td rowspan="9" align="center" valign="top"><img name="" src="../photo/<%=user.getUsIdcard()%>.jpg" width="200" height="240" alt="" /></td>
          </tr>
   		  <tr>
   		    <td>考生类别：</td>
   		    <td><%=userinfo.getInKslb() %></td>
   		    <td>政治面貌：</td>
   		    <td><%=userinfo.getInZzmm() %></td>
   		    <td>外语：</td>
   		    <td><%=userinfo.getInWyyz()%></td>
	      </tr>
   		  <tr>
   		    <td>毕业类别：</td>
   		    <td><%=userinfo.getInBylb()%></td>
   		    <td>科类：</td>
   		    <td><%=userinfo.getInKl() %></td>
   		    <td>报名序号：</td>
   		    <td><%=user.getUsBmxh() %></td>
	      </tr>
   		  <tr>
   		    <td>证件类型：</td>
   		    <td><%=userinfo.getInZjlx()%></td>
   		    <td>身份证号：</td>
   		    <td><%=user.getUsIdcard() %></td>
   		    <td>户籍地名称：</td>
   		    <td><%=userinfo.getInHjmc() %></td>
	      </tr>
   		  <tr>
   		    <td>市名称：</td>
   		    <td><%=userinfo.getInSdmc()%></td>
   		    <td>县名称：</td>
   		    <td><%=userinfo.getInSxmc()%></td>
   		    <td>报名点名称：</td>
   		    <td><%=userinfo.getInBmdmc()%></td>
	      </tr>
   		  <tr>
   		    <td>联系电话1：</td>
   		    <td><%=userinfo.getInLxdh() %></td>
   		    <td>联系电话2：</td>
			<td><%=userinfo.getInLxdh2() %></td>
   		    <td>毕业中学：</td>
   		    <td><%=userinfo.getInByxxmc() %></td>
	      </tr>
   		  <tr>
   		    <td>选考科目：</td>
   		    <td><%=userinfo.getInXkkm() %></td>
   		    <td>已选考科目：</td>
			<td><%=userinfo.getInYkxkkm() %></td>
   		    <td>专业服从：</td>
   		    <td><%=userinfo.getInZyfc() %></td>
	      </tr>
	      
  </table>
	     
          <%if(!Status.HIDDEN.getStatus().equals(school.getScCjActive())){ %>
          <table width="1000" class="cj" style="margin-bottom:0px;margin:0 auto;">
            <tr>
              <td>家庭成员</td>
              <td>姓名</td>
              <td>工作单位</td>
              <td>职务</td>
              <td>联系电话</td>
            </tr>
            <tr>
              <td>父亲<br>
                (或其他监护人)</td>
              <td><%=html.getInputString(xy.getXyYw())%></td>
              <td><%=html.getInputString(xy.getXyWy()) %></td>
              <td><%=html.getInputString(xy.getXySx()) %></td>
              <td><%=html.getInputString(xy.getXyZz()) %></td>
            </tr>
            <tr>
              <td>母亲<br>
                (或其他监护人)</td>
              <td><%=html.getInputString(xy.getXyLs()) %></td>
              <td><%=html.getInputString(xy.getXyDl()) %></td>
              <td><%=html.getInputString(xy.getXyWl()) %></td>
              <td><%=html.getInputString(xy.getXyHx()) %></td>
            </tr>
          </table>
          <table width="1000" class="cj" style="margin-bottom:0px;margin:0 auto;">
            <tr>
              <td colspan="8">选考成绩</td>
            </tr>
            <tr>
              <td width="112" >科目</td>
              <td width="120" >政治</td>
              <td width="128" >历史</td>
              <td width="120" >地理</td>
              <td width="120" >物理</td>
              <td width="120" >化学</td>
              <td width="124" >生物</td>
              <td width="120" >技术</td>
            </tr>
            <tr>
              <td>选考</td>
              <td><%if(userinfo.getInXkkm()!=null&&userinfo.getInXkkm().contains("政治"))out.print("是"); %></td>
              <td><%if(userinfo.getInXkkm()!=null&&userinfo.getInXkkm().contains("历史"))out.print("是"); %></td>
              <td><%if(userinfo.getInXkkm()!=null&&userinfo.getInXkkm().contains("地理"))out.print("是"); %></td>
              <td><%if(userinfo.getInXkkm()!=null&&userinfo.getInXkkm().contains("物理"))out.print("是"); %></td>
              <td><%if(userinfo.getInXkkm()!=null&&userinfo.getInXkkm().contains("化学"))out.print("是"); %></td>
              <td><%if(userinfo.getInXkkm()!=null&&userinfo.getInXkkm().contains("生物"))out.print("是"); %></td>
              <td><%if(userinfo.getInXkkm()!=null&&userinfo.getInXkkm().contains("技术"))out.print("是"); %></td>
            </tr>
            <tr>
              <td>成绩</td>
              <td><%=html.getInputString(xy.getXyXkZz()) %></td>
              <td><%=html.getInputString(xy.getXyXkLs()) %></td>
              <td><%=html.getInputString(xy.getXyXkDl()) %></td>
              <td><%=html.getInputString(xy.getXyXkWl()) %></td>
              <td><%=html.getInputString(xy.getXyXkHx()) %></td>
              <td><%=html.getInputString(xy.getXyXkSw()) %></td>
              <td><%=html.getInputString(xy.getXyXkJs()) %></td>
            </tr>
          </table>
          <%}%>
<table width="1000" class="cj" style="margin-bottom:0px;margin:0 auto;">
          <tr>
            <td colspan="13">学业水平测试成绩</td>
      </tr>
          <tr>
            <td width="120" >科目</td>
            <td width="120" >语文</td>
            <td width="120" >数学</td>
            <td width="120" >外语</td>
            <td width="120" >思想政治</td>
            <td width="120" >历史</td>
            <td width="120" >地理</td>
            <td width="120" >物理</td>
            <td width="120" >化学</td>
            
            <td width="120" >生物</td>
            <td width="120" >技术</td>
            <td width="120" >信息</td>
            <td width="120" >通用</td>
          </tr>
          <tr>
            <td>成绩</td>
            <td><%=userinfo.getInYwdd() %></td>
            <td><%=userinfo.getInSxdd() %></td>
            <td><%=userinfo.getInWydd() %></td>
            <td><%=userinfo.getInZzdd() %></td>
            <td><%=userinfo.getInLsdd() %></td>
            <td><%=userinfo.getInDldd() %></td>
            <td><%=userinfo.getInWldd() %></td>
            <td><%=userinfo.getInHxdd() %></td>
            <td><%=userinfo.getInSwdd() %></td>
            <td><%=userinfo.getInJsdd() %></td>
            <td><%=userinfo.getInXxdd() %></td>
            <td><%=userinfo.getInTydd() %></td>
          </tr>
  </table>
  <table width="1000" class="cj" style="margin-bottom:0px;margin:0 auto;">
            <tr>
              <td colspan="5">综合素质信息</td>
            </tr>
            <tr>
              <td >类别</td>
              <td >品德表现</td>
              <td >运动健康</td>
              <td >艺术素养</td>
              <td >创新实践</td>
            </tr>
            <tr>
              <td>终评等第</td>
              <td><%=userinfo.getInPdbx() %></td>
              <td><%=userinfo.getInYdjk() %></td>
              <td><%=userinfo.getInYssy() %></td>
              <td><%=userinfo.getInCxsj() %></td>
            </tr>
  </table>
          
          
    <table width="1000" class="cj" style="margin-bottom:0px;margin:0 auto;border-bottom:1px solid;">
            <tr>
              <td>特长说明：<%=userinfo.getInBrtc()%></td>
    		</tr>
            <tr>
              <td>其他说明：<%=userinfo.getInBz()%></td>
            </tr>
            <tr>
              <td>获得证书情况：<%=userinfo.getInZsqk()%></td>
            </tr>
            <tr>
              <td>获得荣誉情况：<%=userinfo.getInHjqk()%></td>
            </tr>
      </table>
		<table width="1000" class="gridtable" style="margin-bottom:10px;margin:0 auto;">
          <%if(!Status.HIDDEN.getStatus().equals(school.getScZxlbActive())){ %>
	      <tr>
   		    <td colspan="7">专项条件（严格按招生简章中的专项条件填写）</td>
          </tr>          
	      <tr>
   		    <td width="100">专项类别</td>
   		    <td>奖项级别</td>
   		    <td colspan="2">名称</td>
   		    <td>获奖时间</td>
   		    <td>等级</td>
   		    <td>颁奖单位或相应等级证书</td>
          </tr>
	      <%
   		       for (int j=0; j<zlist.size(); j++){
		    	zxlb = (ZsZxlb)zlist.get(j);
   		       %>
	      <tr>
   		    <td><%=zxlb.getZxType() %></td>
	    	<td><%=zxlb.getZxJb() %></td>
	    	<td colspan="2"><%=zxlb.getZxName() %></td>
	    	<td><%=zxlb.getZxDate() %></td>
	    	<td><%=zxlb.getZxDj() %></td>
	    	<td><%=zxlb.getZxOrg() %></td>
          </tr>
	      <%} %>
	      <%} %>
<%if(!Status.HIDDEN.getStatus().equals(school.getScHjqkActive())){ %>
	      <tr>
   		    <td colspan="7">获奖情况</td>
          </tr>          
	      <tr>   		    
   		    <td>奖项级别</td>
   		    <td colspan="3">名称</td>
            <td>获奖时间</td>
   		    <td>等级</td>
   		    <td>颁奖单位或相应等级证书</td>
          </tr>
	      <%
   		       for (int j=0; j<hlist.size(); j++){
		    	hjqk = (ZsHjqk)hlist.get(j);
   		       %>
	      <tr>
	    	<td><%=hjqk.getHjJb() %></td>
	    	<td colspan="3"><%=hjqk.getHjName() %></td>
            <td><%=hjqk.getHjDate() %></td>
	    	<td><%=hjqk.getHjDj() %></td>
	    	<td><%=hjqk.getHjOrg() %></td>
          </tr>
	      <%} %>
	      <%} %>
	      <%if(!Status.HIDDEN.getStatus().equals(school.getScShhdActive())){ %>
	      <tr>
   		    <td colspan="7">高中阶段参与的社会工作和课外活动（含活动时间、受过何种奖励、本人在活动中的职务或者职责）</td>
          </tr>
	      <tr>
   		    <td colspan="2">活动名称</td>
   		    <td>担任角色</td>
   		    <td colspan="2">活动时间</td>
   		    <td colspan="2">组织单位</td>
          </tr>
	      <%
   		       for (int j=0; j<slist.size(); j++){
		    	shhd = (ZsShhd)slist.get(j);
   		       %>
	      <tr>
   		    <td colspan="2"><%=shhd.getHdName() %></td>
	    	<td><%=shhd.getHdJs() %></td>
	    	<td colspan="2"><%=shhd.getHdDateStart() %>至<%=shhd.getHdDateEnd() %></td>
	    	<td colspan="2"><%=shhd.getHdOrg() %></td>
          </tr>
	      <%} %>
	      <%} %>
      </table>
	</div>
	<br/>

<%} %>
   </div>
</body>
</html>
